package com.ruoyi.project.tugboat.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.tugboat.mapper.CDeviceMapper;
import com.ruoyi.project.tugboat.domain.CDevice;
import com.ruoyi.project.tugboat.service.ICDeviceService;

/**
 * 拖轮设备Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-14
 */
@Service
public class CDeviceServiceImpl implements ICDeviceService 
{
    @Autowired
    private CDeviceMapper cDeviceMapper;

    /**
     * 查询拖轮设备
     * 
     * @param deviceId 拖轮设备主键
     * @return 拖轮设备
     */
    @Override
    public CDevice selectCDeviceByDeviceId(Long deviceId)
    {
        return cDeviceMapper.selectCDeviceByDeviceId(deviceId);
    }

    /**
     * 查询拖轮设备列表
     * 
     * @param cDevice 拖轮设备
     * @return 拖轮设备
     */
    @Override
    public List<CDevice> selectCDeviceList(CDevice cDevice)
    {
        return cDeviceMapper.selectCDeviceList(cDevice);
    }

    /**
     * 新增拖轮设备
     * 
     * @param cDevice 拖轮设备
     * @return 结果
     */
    @Override
    public int insertCDevice(CDevice cDevice)
    {
        return cDeviceMapper.insertCDevice(cDevice);
    }

    /**
     * 修改拖轮设备
     * 
     * @param cDevice 拖轮设备
     * @return 结果
     */
    @Override
    public int updateCDevice(CDevice cDevice)
    {
        return cDeviceMapper.updateCDevice(cDevice);
    }

    /**
     * 批量删除拖轮设备
     * 
     * @param deviceIds 需要删除的拖轮设备主键
     * @return 结果
     */
    @Override
    public int deleteCDeviceByDeviceIds(Long[] deviceIds)
    {
        return cDeviceMapper.deleteCDeviceByDeviceIds(deviceIds);
    }

    /**
     * 删除拖轮设备信息
     * 
     * @param deviceId 拖轮设备主键
     * @return 结果
     */
    @Override
    public int deleteCDeviceByDeviceId(Long deviceId)
    {
        return cDeviceMapper.deleteCDeviceByDeviceId(deviceId);
    }
}
